package com.example.androidkt.third;

import java.util.ArrayList;
import java.util.List;

public class JavaGeneric {
    public static void main(String[] arg){

        List<String> stars  = new ArrayList<>();
        List<Object> objs  = new ArrayList<>();


//        objs = stars;


        List<Dog> dogs  = new ArrayList<>();
        List<? extends Animal> animals  = new ArrayList<>();


        animals = dogs;
    }
}

class Animal{

}
class Dog extends Animal{

}
